<template>
  <div class="form-add">
    <div class="form-container">
      <div class="form-header">
        <el-button @click="cancel" size="small">返回</el-button>
      </div>
      <div class="form-content">
        <el-row>
          <el-col :span="24">
            <div class="grid-content">
              <div class="grid-key">权限组:</div>
              <div class="grid-value">{{form.GroupName}}</div>
            </div>
          </el-col>
          <el-col :span="24">
            <div class="grid-content">
              <div class="grid-key">状态:</div>
              <div class="grid-value">{{form.Status? "启用":"停用"}}</div>
            </div>
          </el-col>
          <el-col :span="24">
            <div class="grid-content">
              <div class="grid-key">创建用户:</div>
              <div class="grid-value">{{form.AddCallName}}</div>
            </div>
          </el-col>
          <el-col :span="24">
            <div class="grid-content">
              <div class="grid-key">创建时间:</div>
              <div class="grid-value">{{form.AddDateTime}}</div>
            </div>
          </el-col>
          <el-col :span="24">
            <div class="grid-content">
              <div class="grid-key">更新用户:</div>
              <div class="grid-value">{{form.UpdateCallName}}</div>
            </div>
          </el-col>
          <el-col :span="24">
            <div class="grid-content">
              <div class="grid-key">更新时间:</div>
              <div class="grid-value">{{form.UpdateDateTime}}</div>
            </div>
          </el-col>
        </el-row>
      </div>
    </div>
  </div>
</template>
<script>

export default {
  name: 'Detail',
  props: ['data'],
  data() {
    return {
      form: {},
    }
  },
  mounted() {
    this.info();
  },
  methods: {

    cancel: function () {
      this.$emit('cancel') // 返回回调父组件方法
    },

    info: function () {
      console.log("this.data:", this.data)
      if (!this.data || !this.data.PurviewGroupId) {
        return;
      }
      this.form = this.data;
      console.log("this.form:", this.form)
    },

  }
}
</script>
